Skip to content

Conversation

HenriqueSchmitz
Copy link

Hello,

I am trying to run this demo that uses your lib, but found that the onnx versions provided in the requirements.txt are not compatible with the newer python versions used by google colab.

In my environment I fixed this by creating the following function:

def replaceVersionedLibraryForGenericVersion(requirementsFilePath, libraryName) -> None:
  requirementsFile = open(requirementsFilePath, "r")
  editedRequirementsText = []
  libCheckString = libraryName + "=="
  for line in requirementsFile:
    if libCheckString in line:
      editedRequirementsText.append(libraryName + "\n")
    else:
      editedRequirementsText.append(line)
  requirementsFile.close()
  newRequirementsFile = open(requirementsFilePath, "w")
  newRequirementsFile.writelines(editedRequirementsText)
  newRequirementsFile.close()

And calling it like this right after cloning the repo:

replaceVersionedLibraryForGenericVersion("ByteTrack/requirements.txt", "onnx")
replaceVersionedLibraryForGenericVersion("ByteTrack/requirements.txt", "onnxruntime")

This fixed my issue, but any other users of this lib will face the same issue. Since the onnx versions required are not fully compatible anymore, I suggest using the most recent versions to avoid this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant